<?php
if( !defined( 'ABSOLUTE_PATH' ) )
    exit('No direct open allowed!');

class PHPError extends Exception {
    function __construct($message, $code, $file, $line) {
        parent::__construct($message, $code);
        $this -> file = $file;
        $this -> line = $line;
    }
}    

class FrameException extends Exception {
    function __construct( $message, $code = 0 ) {
        $this -> message = $message;
        $this -> code = $code;
    }
    static function error_handler( $errno, $errstr, $errfile, $errline ) {
        throw new PHPError( $errstr, $errno, $errfile, $errline );
    }
}

set_error_handler( 'FrameException::error_handler', E_ALL | E_STRICT );